package java01.bll;

// 正方形
public class Square extends Shape {
    private double width;


    public Square(double width) {
        this.width = width;
    }

    @Override
    public double getArea() {
        return width * width + super.getOffset();
    }

    @Override
    public double getPerimeter() {
        return width * 4 + super.offset;
    }
}
